﻿/*  Copyright (C) 2012  Mark Hamburger
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */

using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace removeav2012
{
    public partial class helpForm : Form
    {
        public helpForm()
        {
            InitializeComponent();
        }

        private void mbamButton_Click(object sender, EventArgs e)
        {
            webBrowser1.Url = new Uri("http://www.malwarebytes.org");
        }

        private void closeButton_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void tdsskButton_Click(object sender, EventArgs e)
        {
            webBrowser1.Url = new Uri("http://support.kaspersky.com/faq/?qid=208283363");
        }

        private void cfButton_Click(object sender, EventArgs e)
        {
            webBrowser1.Url = new Uri("http://www.bleepingcomputer.com/download/anti-virus/combofix");
        }

        // Navigates to the URL in the address box when 
        // the ENTER key is pressed while the ToolStripTextBox has focus.
        private void urlText_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Navigate(urlText.Text);
            }
        }

        // Navigates to the URL in the address box when 
        // the Go button is clicked.
        private void goButton_Click(object sender, EventArgs e)
        {
            Navigate(urlText.Text);
        }

        // Navigates to the given URL if it is valid.
        private void Navigate(String address)
        {
            if (String.IsNullOrEmpty(address)) return;
            if (address.Equals("about:blank")) return;
            if (!address.StartsWith("http://") &&
                !address.StartsWith("https://"))
            {
                address = "http://" + address;
            }
            try
            {
                webBrowser1.Navigate(new Uri(address));
            }
            catch (System.UriFormatException)
            {
                return;
            }
        }

        // Updates the URL in TextBoxAddress upon navigation.
        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            urlText.Text = webBrowser1.Url.ToString();
        }

        private void inetoptButton_Click(object sender, EventArgs e)
        {
            Process.Start("inetcpl.cpl");
        }

        private void helpForm_Load(object sender, EventArgs e)
        {

        }


    }
}
